package com.lishe.lishe.lishe.module.mall.interfaces;

import com.lishe.lishe.lishe.module.mall.bean.category.CategoryFirst;
import com.lishe.lishe.lishe.module.mall.bean.category.CategoryGoods;
import com.lishe.lishe.retrofit.BaseRequestBody;
import com.lishe.lishe.retrofit.bean.DataPageItemBody;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * Created by yang on 2017/12/19.
 */

public interface ClassificationService {

    //一级分类列表
    @GET("index1/categoryFirstList")
    Observable<BaseRequestBody<List<CategoryFirst>>> categoryFirstList();

    //二级分类列表
    @FormUrlEncoded
    @POST("index1/categorySecondList")
    Observable<BaseRequestBody<List<CategoryFirst>>> categorySecondList(@Field("cate_id") String cate_id);


    //心意商城首页三级分类接口
    @FormUrlEncoded
    @POST("index1/getMoreItems")
    Observable<BaseRequestBody<DataPageItemBody<CategoryGoods>>> getMoreItems(@Field("activity_config_id") String activity_config_id, @Field("bind") String bind,
                                                                                    @Field("price") String price, @Field("sold") String sold,
                                                                                    @Field("shop") String shop, @Field("priceRange") String priceRange,
                                                                                    @Field("page") int page, @Field("pageSize") int pageSize);

    //心意商城首页三级分类接口
    @FormUrlEncoded
    @POST("index1/categoryItems")
    Observable<BaseRequestBody<DataPageItemBody<CategoryGoods>>> categoryItems(@Field("cate_id") String cate_id, @Field("original_cate_id") String original_cate_id,
                                                                                 @Field("bind") String bind,
                                                                                 @Field("price") String price, @Field("sold") String sold,
                                                                                 @Field("shop") String shop, @Field("priceRange") String priceRange,
                                                                                 @Field("page") int page, @Field("pageSize") int pageSize);


}
